<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // Promise.resolve：该静态方法用于直接返回一个成功promise对象
        let promise = Promise.resolve("成功了");
        promise.then(res => {
            console.log(res);
        })

        // Promise.reject：该静态方法用于直接返回一个失败promise对象
        let promise2 = Promise.reject("失败了");
        promise2.then(res => {},res => {
            console.log(res);
        })

    </script>



</body>
</html>